package com.icson.oa.action.user;

import java.util.Map;

import com.icson.oa.bean.User;
import com.icson.oa.service.UserService;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class NewUserAction extends ActionSupport {
	/**
	 * 
	 */
	private User user;
	private UserService service;

	public UserService getService() {
		return service;
	}

	public void setService(UserService service) {
		this.service = service;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String execute() throws Exception {

		this.service.save(this.user);
		/*String bt = new String(this.user.getChinese_name()
				.getBytes("ISO8859-1"), "UTF-8");
		System.out.println(bt);*/
		return SUCCESS;
	}

}
